import { makeAutoObservable } from "mobx";
import { MyInFoFileFace } from '@/utils/profile';
import { Profille , PutFille} from '@/services';
class proFile{
    constructor(){
        makeAutoObservable(this);
    }
    MyInFoFile: MyInFoFileFace  = {} as MyInFoFileFace;
    async getInFo (){
        let result = await Profille();
        if( result.data ){
            this.MyInFoFile = result.data;
        }
    }
    async PutGetInFo(params : any){
        let newData = { ...this.MyInFoFile , ...params }
        let result = await PutFille(newData);
        console.log( '传入值...' ,newData);
        console.log( '返回值...' , result );
        this.getInFo();

    }
};
export default new proFile